package org.yzh.scheduler.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.yzh.scheduler.model.entity.ScheduleJobDO;

import java.util.List;

@Mapper
@Repository
public interface ScheduleJobMapper {

    String[] groupNames();

    List<ScheduleJobDO> find(@Param("name") String name, @Param("group") String group, @Param("disable") Boolean disable);

    ScheduleJobDO get(@Param("name") String name, @Param("group") String group);

    int delete(@Param("name") String name, @Param("group") String group);

    int insert(ScheduleJobDO entity);

    int update(ScheduleJobDO entity);

}